<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/theme/jquery.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/layerui/layer.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/layerui/layer.ext.js"></script>
	<link rel="stylesheet" href="${pageContext.request.contextPath}/css/skin/css/mobilecss/charge.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/skin/css/mobilecss/main.css">
    <style type="text/css">
        body {
            padding-bottom: 40px;
            
        }
        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }


    </style>
</head>
<body>
<form action="" method="post" class="definewidth m20">
<div class="container">
        <p style="font-size: 0.9rem" id="addTitle">顶部 左 点击 + 提示信息</p>
        <div style="border: 0px solid #636363">
        	<textarea rows="3" id="NC_SHOP_TXT" cols="40">${shopTxt.statusString}</textarea>
        </div>
        <div style="margin-top: 0.5rem">
            <button type="button" style="width: 100%" onclick="saveNotece('NC_SHOP_TXT')" id="saveBank" >确认修改</button>
        </div>
        <hr width="100%" color="#999999" SIZE=1 />
        <p style="font-size: 0.9rem" id="addTitle">滚动公告</p>
        <div style="border: 0px solid #636363">
            <textarea rows="3" id="HN_SC_NOTICE" cols="40">${scNotice.statusString}</textarea>
        </div>
        <div style="margin-top: 0.5rem">
            <button type="button" style="width: 100%" onclick="saveNotece('HN_SC_NOTICE')" id="saveBank" >确认修改</button>
        </div>
        <hr width="100%" color="#999999" SIZE=1 />
        
        <p style="font-size: 0.9rem" id="addTitle">邀请奖励房卡设置</p>
        <div style="border: 0px solid #636363">
        	<input type="text" id="RoomCardMenInvited" name="RoomCardMenInvited" placeholder="被邀请人的奖励房卡数量" value="${roomInvited.statusValue}" onkeyup="value=value.replace(/[^\d]/g,'')" maxLength="11" style="width: 94%">
        </div>
        <div style="margin-top: 0.5rem">
            <button type="button" style="width: 100%" onclick="saveInvited('RoomCardMenInvited')" id="saveBank" >确认修改</button>
        </div>
        <hr width="100%" color="#999999" SIZE=1 />
        <p style="font-size: 0.9rem" id="addTitle">代理商后台发放房卡设置</p>
        <div style="border: 0px solid #636363">
        <select name="dictValue" id="dictValue" style="width: 99%">
        	<option value="1" ${dict.dictValue==1?'selected':'' }>开放</option>
        	<option value="2" ${dict.dictValue==2?'selected':'' }>关闭</option>
        </select>
        </div>
        <div style="margin-top: 0.5rem">
            <button type="button" style="width: 100%" onclick="saveDict('${dict.id}')" id="saveBank" >确认修改</button>
        </div>
        
        <%-- <p style="font-size: 0.9rem" id="addTitle">公告信息</p>
        <div style="border: 0px solid #636363">
            <textarea rows="3" id="Home_Msg_NOTICE" cols="45">${homeNotice.statusString}</textarea>
        </div>
        <div style="margin-top: 0.5rem">
            <button type="button" style="width: 100%" onclick="saveNotece('Home_Msg_NOTICE')" id="saveBank" >确认修改</button>
        </div> --%>
        
        <br>
        <br>&nbsp;
        
    </div>
</form>
</body>
<script type="text/javascript">
	
	function saveDict(id){
		var dictValue= $("#dictValue").val();
		$.post("${pageContext.request.contextPath}/admin/dict_edit_save.html",
	       {"id":id,"dictValue":dictValue},
	       function(data){
            	var json = eval("("+data+")");
				if(json.statusCode =='200'){
					layer.alert(json.message);
				}else{
					layer.alert(json.message);
				}
	      });
		
	}
	
	function saveNotece(statusName){
		var statusString= $("#"+statusName).val();
		$.post("${pageContext.request.contextPath}/admin/param_notile_mobile_edit.html",
	       {"statusString":statusString,"statusName":statusName},
	       function(data){
            	var json = eval("("+data+")");
				if(json.statusCode =='200'){
					layer.alert(json.message);
				}else{
					layer.alert(json.message);
				}
	      });
	}
	
	function saveInvited(statusName){
		var statusValue= $("#"+statusName).val();
		$.post("${pageContext.request.contextPath}/admin/param_edit.html",
	       {"statusValue":statusValue,"statusName":statusName},
	       function(data){
            	var json = eval("("+data+")");
				if(json.statusCode =='200'){
					layer.alert(json.message);
				}else{
					layer.alert(json.message);
				}
	      });
	}
	
	
    $(function () {       
		
    });
    
    
  
</script>
</html>